<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="UTF-8">
    <script type="text/javascript" src="../assets/js/vue.js"></script>
    <title>Component 父子组件关系</title>
</head>

<body>
    <h1>Component 父子组件关系</h1>
    <hr>
    <div id="app">
        <panda></panda>
    </div>
    <script type="text/javascript">
        var city = {
            template:`<div style="color:red">sichuan of china</div>`
        }
        var pandacomponents = {
            template:`
            <div>
                <p style="color:#00925f">panda from china</p>
                <city></city>
            </div>
            `,
            components:{
                "city":city
            }
        }
        var app = new Vue({
            el: '#app',
            components:{
                "panda":pandacomponents
            }
        })
    </script>
</body>

</html>